package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysMemberAddress;
import com.ruoyi.system.mapper.SysMemberAddressMapper;
import com.ruoyi.system.service.ISysMemberAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysStockMapper;
import com.ruoyi.system.domain.SysStock;
import com.ruoyi.system.service.ISysStockService;

/**
 * 库存详细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-25
 */
@Service
public class SysStockServiceImpl implements ISysStockService 
{
    @Autowired
    private SysStockMapper sysStockMapper;

    /**
     * 查询库存详细
     * 
     * @param id 库存详细主键
     * @return 库存详细
     */
    @Override
    public SysStock selectSysStockById(String id)
    {
        return sysStockMapper.selectSysStockById(id);
    }

    /**
     * 查询库存详细列表
     * 
     * @param sysStock 库存详细
     * @return 库存详细
     */
    @Override
    public List<SysStock> selectSysStockList(SysStock sysStock)
    {
        return sysStockMapper.selectSysStockList(sysStock);
    }

    /**
     * 新增库存详细
     * 
     * @param sysStock 库存详细
     * @return 结果
     */
    @Override
    public int insertSysStock(SysStock sysStock)
    {
        sysStock.setCreateTime(DateUtils.getNowDate());
        return sysStockMapper.insertSysStock(sysStock);
    }

    /**
     * 修改库存详细
     * 
     * @param sysStock 库存详细
     * @return 结果
     */
    @Override
    public int updateSysStock(SysStock sysStock)
    {
        sysStock.setUpdateTime(DateUtils.getNowDate());
        return sysStockMapper.updateSysStock(sysStock);
    }

    /**
     * 批量删除库存详细
     * 
     * @param ids 需要删除的库存详细主键
     * @return 结果
     */
    @Override
    public int deleteSysStockByIds(String[] ids)
    {
        return sysStockMapper.deleteSysStockByIds(ids);
    }

    /**
     * 删除库存详细信息
     * 
     * @param id 库存详细主键
     * @return 结果
     */
    @Override
    public int deleteSysStockById(String id)
    {
        return sysStockMapper.deleteSysStockById(id);
    }

}
